package com.hdu.clj.dncard.database

import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper
import android.util.Log

class MonsterDatabase(val context: Context, name:String, version:Int): SQLiteOpenHelper(context,name,null,version) {

    private val MonBook = "create table Monster(" +
            "id integer primary key autoincrement," +
            "mid text unique," +
            "attack integer," +
            "mname text," +
            "life integer)"

    override fun onCreate(db: SQLiteDatabase) {
        db.execSQL(MonBook)
    }

    override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {

    }
}